#if !defined( __MEMCACHEASIO_H__)
#define __MEMCACHEASIO_H__

/* Copyright (c) 2008, dZettaApart.
   Licensed under the BSD License.
   See COPYING for details. */

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif

#include <boost/bind.hpp>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>

#include <deque>
#include <list>
#include <iostream>

#include "memcacheasio_request.h"

namespace memcacheasio
{
	class ConnectionsPool;
    class Memcacheasio_p;

	class Memcacheasio : private boost::noncopyable
	{

		public:
			Memcacheasio();
			~Memcacheasio();

			void init ( const std::string& /*host*/, const std::string& /*port*/, int count_connection = 1, int count_thread = 1, int tryCount = 1, int tryTimeout = 20, int limitConnection = 1 );
			void stop();

			void execute ( Request::Ptr /*request*/, boost::function1<void, Request::Ptr > /*cb*/ );

		private:
			boost::shared_ptr<Memcacheasio_p>	_memcacheasio_p;

	};

} //namespace memcacheasio

#endif // !defined(__MEMCACHEASIO_H__)
